Spanning Tree Protocol (STP) is a Layer 2 protocol designed to run on bridges and switches. The spanning tree is a reduction of the layer 2 network mesh constructed such that packets may be forwarded across the network without any looping. The STP specification is defined in IEEE 802.1D and RSTP (Rapid Spanning Tree Protocol) is defined in IEEE 802.1w (incorporated into IEEE 802.1D-2004). The main goal of STP is to make sure that a loop situation does not occur when there are redundant paths in a network. STP accomplishes this by disabling network loops and providing backup links between switches or bridges. STP allows devices to interact with other STP compliant devices in the network to ensure that only one path exists between any two stations on the network. If STP or a similar protocol is not present in a redundant topology network, switches may endlessly flood broadcast packets to all ports (i.e., broadcast storm). When multiple copies of a frame arrive at different ports of a switch, MAC entry instability in a filtering database may occur.
In order to obtain information necessary to run the spanning tree protocol, bridges exchange special messages called Bridge Protocol Data Unit (BPDU) messages. The Spanning Tree Algorithm (STA) determines the role of a port based on BPDUs. The port receiving the best BPDU on a bridge is the root port. This is the port that is closest to the root bridge in terms of path cost. STP uses two different BPDUs; Configuration BPDUs and Topology Change BPDUs (TCN BPDUs). Configuration BPDUs originate from the root bridge every hello time and carry all information required to calculate spanning tree topology. In normal STP operation, a bridge continues to receive Configuration BPDUs from the root bridge. When a bridge needs to signal a topology change, it sends TCNs on its root port. The designated bridge receives the TCN, acknowledges it, and generates another TCN for its own root port. The designated bridge acknowledges the TCN by sending back a Configuration BPDU with the Topology Change Acknowledgement (TCA) bit set. This process continues until the TCN hits the root bridge. Once the root is aware that there has been a topology change event in the network, it starts to send out Configuration BPDUs with the topology change (TC) bit set. These BPDUs are relayed by every bridge in the network with this bit set. As a result all bridges become aware of the topology change.
RSTP is an improved and faster version of STP. RSTP uses only one type of BPDU, referred to as RSTP BPDU. The RSTP BPDU is similar to STP Configuration BPDUs with the exception of a type field set to “version 2” for RSTP and “version 0” for STP, and a flag field carrying additional information. RSTP bridges send information to each other in configuration messages to select a root bridge and the shortest path to it from each LAN (Local Area Network) and each of the other bridges. The information sent for this purpose is known as a spanning tree priority vector. Each priority vector includes: root bridge identifier (of the bridge believed to be the root by the transmitter); root path cost (to root bridge from transmitting bridge); bridge identifier (of the transmitting bridge); port identifier of port through which message was transmitted; and port identifier of port through which message was received (where relevant). With RSTP, every switch that detects a topology change sends BPDUs with the topology change (TC) flag set. When a bridge receives a BPDU with the TC bit set, it sends out BPDUs with the TC bit set on all of its designated ports and root port.
In any switching network there is a possibility of spanning tree loops or instability due to flapping interfaces/hosts or other problems. Troubleshooting STP loops or any instability is a very time consuming process and significantly increases Mean Time to Repair (MTTR). One method for troubleshooting STP loops is to see if TCNs are rapidly increasing on a switch. The use of TCNs is one way of detecting a loop or system instability, but this does not help to isolate the problem.
There is, therefore, a need for a method and system for identifying the network device that is a source of a STP loop or instability using a Spanning Tree Protocol.